package TAIC.text;

public class WordInClass implements Comparable {
	int totalClass; 
	int ID ; 
	public double count [];
	public double prob[ ] ;  // p( w|c)
	public double C [ ];   // p ( c|w ) 
	public double NC [] ;	// p( c | !w ) 
	public double IG  ;  // p(t)\sum P(c_i|w)logP(c_i|w) + p(!t)\sum (c_i|!w)log(c_i|!w)
	public double Pt  ;// p(t)
	
	public WordInClass ( int t ) {
		totalClass = t ;
		count = new double [ t ] ;
		prob = new double [ t ] ;
		C = new double [ t ] ;
		NC = new double [ t ] ; 
		IG = 0 ; 
	}
	
	public int compareTo ( Object o ) { 
		if ( o instanceof WordInClass) {
			WordInClass p = (WordInClass) o ;
			if ( IG > p.IG ) return -1 ;
			else if ( IG == p.IG ) return 0 ;
			else return 1 ; 
		}
		return 0 ;
	}
}
